<?php

//echo br(3); ###########################################################################################

	$TEMP->set_file(array('handle' => DIR_VIEW_STUDENTS . 'myAnnouncement.html'));
	
	
	include DIR_MODEL		. "announcementMod.php";
	include DIR_CONTROLLER	. "announcementCon.php";
	
	$ANNOUNCE 		= new WS_AnnouncementCon();
	
	
	$allDeptAnnouncement = $ANNOUNCE->getAllDeptAnnouncement($strDeptID);

	if ( !empty($allDeptAnnouncement) ) {
		
		$TEMP->set_block('handle',  'announcements', 'announcementRow');
		foreach($allDeptAnnouncement as $allDeptAnnouncementValue) {
			
			$TEMP->set_var(array('title'		=> $allDeptAnnouncementValue['announce_title'],
								 'desc' 		=> $allDeptAnnouncementValue['announce_desc'],
								 'timestamp' 	=> '<strong>POSTED DATE:</strong>' . lFdY($allDeptAnnouncementValue['timestamp'])));
			$TEMP->parse('announcementRow', 'announcements', true);		
		}
	}
	else {
		$TEMP->set_var(array('title'		=> '',
							 'desc' 		=> '',
							 'timestamp' 	=> ''));
	}
	$TEMP->set_var(array('stud_sub_menu'	=> $studentDesignName,
						 'stud_active_sem'	=> $studActiveSemester,
						 'announcement'		=> $announcement,
						));
?>